<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>FEUP-Defender: video-graphics/SPRITE.H Source File</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="../../search/search.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Gerado por Doxygen 1.6.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "../../search",false,'Localizar');
--></script>
<script type="text/javascript">
<!--
function changeDisplayState (e){
  var num=this.id.replace(/[^[0-9]/g,'');
  var button=this.firstChild;
  var sectionDiv=document.getElementById('dynsection'+num);
  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
    sectionDiv.style.display='block';
    button.src='../../open.gif';
  }else{
    sectionDiv.style.display='none';
    button.src='../../closed.gif';
  }
}
function initDynSections(){
  var divs=document.getElementsByTagName('div');
  var sectionCounter=1;
  for(var i=0;i<divs.length-1;i++){
    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
      var header=divs[i];
      var section=divs[i+1];
      var button=header.firstChild;
      if (button!='IMG'){
        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
        button=document.createElement('img');
        divs[i].insertBefore(button,divs[i].firstChild);
      }
      header.style.cursor='pointer';
      header.onclick=changeDisplayState;
      header.id='dynheader'+sectionCounter;
      button.src='../../closed.gif';
      section.id='dynsection'+sectionCounter;
      section.style.display='none';
      section.style.marginLeft='14px';
      sectionCounter++;
    }
  }
}
window.onload = initDynSections;
-->
</script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="../../index.html"><span>Página&nbsp;principal</span></a></li>
      <li><a href="../../modules.html"><span>Módulos</span></a></li>
      <li><a href="../../annotated.html"><span>Estruturas&nbsp;de&nbsp;dados</span></a></li>
      <li class="current"><a href="../../files.html"><span>Ficheiros</span></a></li>
      <li><a href="../../dirs.html"><span>Directories</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="../../search/search.png"
             onmouseover="return searchBox.OnSearchSelectShow()"
             onmouseout="return searchBox.OnSearchSelectHide()"
             alt=""/>
        <input type="text" id="MSearchField" value="Localizar" accesskey="S"
             onfocus="searchBox.OnSearchFieldFocus(true)" 
             onblur="searchBox.OnSearchFieldFocus(false)" 
             onkeyup="searchBox.OnSearchFieldChange(event)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="../../files.html"><span>Lista&nbsp;de&nbsp;ficheiros</span></a></li>
      <li><a href="../../globals.html"><span>Globais</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="../../dir_686781ac0099e9c23523591a8a871e66.html">video-graphics</a>
  </div>
</div>
<div class="contents">
<h1>SPRITE.H</h1><a href="../../d8/d47/SPRITE_8H.html">Ir para a documentação deste ficheiro.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef _SPRITE_H_</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define _SPRITE_H_</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;math.h&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00006"></a>00006 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &lt;string.h&gt;</span>
<a name="l00008"></a>00008 
<a name="l00009"></a>00009 <span class="preprocessor">#include &quot;<a class="code" href="../../d2/df8/video-graphics_8h.html">video-graphics.h</a>&quot;</span>
<a name="l00010"></a>00010 
<a name="l00011"></a>00011 
<a name="l00023"></a><a class="code" href="../../da/d3a/structSprite.html">00023</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00024"></a><a class="code" href="../../da/d3a/structSprite.html#a0a2f84ed7838f07779ae24c5a9086d33">00024</a>         <span class="keywordtype">int</span> x, y;            
<a name="l00025"></a><a class="code" href="../../da/d3a/structSprite.html#a2474a5474cbff19523a51eb1de01cda4">00025</a>         <span class="keywordtype">int</span> width, height;   
<a name="l00026"></a><a class="code" href="../../da/d3a/structSprite.html#a8e19090b4aa5dd9bb43efe8b74488f6d">00026</a>         <span class="keywordtype">int</span> xspeed, yspeed;  
<a name="l00027"></a><a class="code" href="../../da/d3a/structSprite.html#a7b00b1bfd666e26484471bd17a74eaa9">00027</a>         <span class="keywordtype">char</span> *map;           
<a name="l00028"></a><a class="code" href="../../da/d3a/structSprite.html#a4cc1a63c6b6bb7981f6b4a054e8fa098">00028</a>         <span class="keywordtype">char</span> *bgmap;               
<a name="l00029"></a>00029 } <a class="code" href="../../da/d3a/structSprite.html">Sprite</a>;
<a name="l00030"></a>00030 
<a name="l00031"></a><a class="code" href="../../d4/d18/group__sprite.html#gac2cd96d53dd3ba6407db6766c3d92b26">00031</a> <span class="preprocessor">#define MAX_SPEED 5    </span>
<a name="l00032"></a><a class="code" href="../../d4/d18/group__sprite.html#gaeb36ab00594b7e7e003a891d8e823f81">00032</a> <span class="preprocessor">#define RIGHT_HIT 2    </span>
<a name="l00033"></a><a class="code" href="../../d4/d18/group__sprite.html#ga7a047d192cdd3831464a17e3a3e5de6c">00033</a> <span class="preprocessor">#define LEFT_HIT 3     </span>
<a name="l00034"></a><a class="code" href="../../d4/d18/group__sprite.html#ga56c64c13c42271b70bcb51986ee8da20">00034</a> <span class="preprocessor">#define MOUSE_HIT 4    </span>
<a name="l00050"></a>00050 <span class="preprocessor">char *read_xpm(char *map[], int *width, int *height);</span>
<a name="l00051"></a>00051 <span class="preprocessor"></span>
<a name="l00056"></a>00056 <a class="code" href="../../da/d3a/structSprite.html">Sprite</a>* <a class="code" href="../../d4/d18/group__sprite.html#gac732cca247655c1bac63318eb29ffe7f">create_sprite</a>(<span class="keywordtype">char</span> *pic[]);
<a name="l00057"></a>00057 <a class="code" href="../../da/d3a/structSprite.html">Sprite</a>* <a class="code" href="../../d4/d18/group__sprite.html#gaea125ed51778887ae732641df4842663">create_unbuffered_sprite</a>(<span class="keywordtype">char</span> *pic[]);
<a name="l00058"></a>00058 <a class="code" href="../../da/d3a/structSprite.html">Sprite</a>* <a class="code" href="../../d4/d18/group__sprite.html#gaa9ab6a26ab5bfd7ffc480128d6a4d307">capture_screen</a>(<span class="keywordtype">int</span> x_ini, <span class="keywordtype">int</span> y_ini, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keywordtype">char</span>* base);
<a name="l00059"></a>00059 
<a name="l00063"></a>00063 <span class="keywordtype">void</span> <a class="code" href="../../d4/d18/group__sprite.html#ga5c23ddc01d5d729ab434ae2dbb497d9b">draw_sprite</a>(<a class="code" href="../../da/d3a/structSprite.html">Sprite</a> *sprt, <span class="keywordtype">char</span> *base);
<a name="l00064"></a>00064 <span class="keywordtype">void</span> <a class="code" href="../../d4/d18/group__sprite.html#ga238099ba434fd07b23337a83df742773">update_sprite</a>(<a class="code" href="../../da/d3a/structSprite.html">Sprite</a>* sprt, <span class="keywordtype">char</span>* base);
<a name="l00065"></a>00065 
<a name="l00070"></a>00070 <span class="keywordtype">void</span> <a class="code" href="../../d4/d18/group__sprite.html#gafd72bd42b3d68e35201c12ce287cd3e7">draw_sprite_rotated</a>(<a class="code" href="../../da/d3a/structSprite.html">Sprite</a> *sprt, <span class="keywordtype">char</span> *base, <span class="keywordtype">int</span> angle);
<a name="l00071"></a>00071 
<a name="l00072"></a>00072 <span class="comment">//faz la os teus comentarios em ingles a paritr, oh banana!</span>
<a name="l00073"></a>00073 <span class="keywordtype">void</span> <a class="code" href="../../d4/d18/group__sprite.html#ga0c8170d1127ecc74d58f87b112b1b461">draw_sprite_scaled</a>(<a class="code" href="../../da/d3a/structSprite.html">Sprite</a> *sprt, <span class="keywordtype">char</span> *base, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height);
<a name="l00074"></a>00074 
<a name="l00075"></a>00075 <span class="keywordtype">void</span> <a class="code" href="../../d4/d18/group__sprite.html#ga04811ceec9b2d18181ac060136eda09d">draw_sprite_rotated_scaled</a>(<a class="code" href="../../da/d3a/structSprite.html">Sprite</a> *sprt, <span class="keywordtype">char</span> *base, <span class="keywordtype">int</span> angle, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height);
<a name="l00076"></a>00076 
<a name="l00078"></a>00078 <span class="keywordtype">void</span> <a class="code" href="../../d4/d18/group__sprite.html#gaf24b9f5f8dc0c6a60e4263e88ac41a9c">draw_mosaic</a>(<a class="code" href="../../da/d3a/structSprite.html">Sprite</a>* sprt, <span class="keywordtype">char</span> *base);
<a name="l00079"></a>00079 
<a name="l00081"></a>00081 <span class="keywordtype">void</span> <a class="code" href="../../d4/d18/group__sprite.html#ga3b37bd781f601a8a1d7eaa34e14c1cd7">delete_sprite</a>(<a class="code" href="../../da/d3a/structSprite.html">Sprite</a> *sprt, <span class="keywordtype">char</span> *base);
<a name="l00082"></a>00082 <span class="keywordtype">void</span> <a class="code" href="../../d4/d18/group__sprite.html#gabe11190455f603b11f3a8a195e9cde45">delete_sprite_rotated</a>(<a class="code" href="../../da/d3a/structSprite.html">Sprite</a> *sprt, <span class="keywordtype">char</span> *base, <span class="keywordtype">int</span> angle);
<a name="l00083"></a>00083 <span class="keywordtype">void</span> <a class="code" href="../../d4/d18/group__sprite.html#ga0db50460d5c72ad5e6dd2ea26178e968">delete_sprite_scaled</a>(<a class="code" href="../../da/d3a/structSprite.html">Sprite</a> *sprt, <span class="keywordtype">char</span> *base, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height);
<a name="l00084"></a>00084 
<a name="l00085"></a>00085 <span class="keywordtype">void</span> <a class="code" href="../../d4/d18/group__sprite.html#ga312c0a1681116fec27c3eedc167fde25">animate_sprite</a>(<a class="code" href="../../da/d3a/structSprite.html">Sprite</a> *sprt, <span class="keywordtype">char</span> *base);
<a name="l00086"></a>00086 <span class="keywordtype">void</span> <a class="code" href="../../d4/d18/group__sprite.html#ga255ede37ffcbe9b8130667bcbf007387">animate_sprite_rotated</a>(<a class="code" href="../../da/d3a/structSprite.html">Sprite</a> *sprt, <span class="keywordtype">char</span> *base, <span class="keywordtype">int</span> angle);
<a name="l00087"></a>00087 
<a name="l00089"></a>00089 <span class="keywordtype">void</span> <a class="code" href="../../d4/d18/group__sprite.html#ga2fb91a3a8c174bbd441e88256d6db987">move_sprite</a>(<a class="code" href="../../da/d3a/structSprite.html">Sprite</a> *sprt, <span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">char</span> *base);
<a name="l00090"></a>00090 
<a name="l00094"></a>00094 <span class="keywordtype">void</span> <a class="code" href="../../d4/d18/group__sprite.html#ga0e7795d3f5963911c80f5167a2f4812b">destroy_sprite</a>(<a class="code" href="../../da/d3a/structSprite.html">Sprite</a> *sprt);
<a name="l00095"></a>00095 
<a name="l00104"></a>00104 <span class="keywordtype">void</span> <a class="code" href="../../d4/d18/group__sprite.html#ga5c0da2e39973a2e7103cc833bb5b827f">move_cursor</a>(<a class="code" href="../../da/d3a/structSprite.html">Sprite</a> *fig, <span class="keywordtype">int</span> xstep, <span class="keywordtype">int</span> ystep, <span class="keywordtype">char</span> *base);
<a name="l00105"></a>00105 
<a name="l00106"></a>00106 <span class="keywordtype">void</span> <a class="code" href="../../d4/d18/group__sprite.html#gad61882c39cb6842ec711d1e959e32a7c">flip_buffer</a>(<span class="keywordtype">char</span>* dest, <span class="keywordtype">char</span>* src);
<a name="l00107"></a>00107 <span class="keywordtype">void</span> <a class="code" href="../../d4/d18/group__sprite.html#ga49a1c8dfb402ff70c8861850b67ba0ec">flip_buffer_partial</a>(<span class="keywordtype">char</span>* dest, <span class="keywordtype">char</span>* src, <span class="keywordtype">int</span> xi, <span class="keywordtype">int</span> yi, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height);
<a name="l00108"></a>00108 
<a name="l00109"></a>00109 
<a name="l00112"></a>00112 <span class="preprocessor">#endif</span>
</pre></div></div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>Tudo</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Estruturas de dados</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Ficheiros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Funções</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Variáveis</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Definições de tipos</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Enumerações</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>Valores da enumeração</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&nbsp;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address style="text-align: right;"><small>Gerado em Tue Jun 1 21:46:45 2010 para FEUP-Defender por&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>
